package com.huangjian.service;

import com.huangjian.mapper.ProductMapper;
import com.huangjian.pojo.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    private ProductMapper productMapper;

    @Override
    public boolean addProduct(Product product) {
        return productMapper.addProduct(product);
    }

    @Override
    public Product queryById(Integer id) {
        return productMapper.queryById(id);
    }

    @Override
    public List<Product> queryAll() {
        return productMapper.queryAll();
    }
}
